---@class Table_PublicAtlasItem
local Table_PublicAtlasItem = class("Table_PublicAtlasItem");

function Table_PublicAtlasItem:ctor()
    self.Id = 0;    --唯一ID
    self.PublicAtlas = "";    --图集路径
end

function Table_PublicAtlasItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.PublicAtlas = reader:ReadString();
    self.temp = nil;
end

---@class Table_PublicAtlasMgr : IDataMgr
local Table_PublicAtlasMgr = class("Table_PublicAtlasMgr", IDataMgr);

function Table_PublicAtlasMgr:FileName()
    return "Txt/PublicAtlas.txt";
end

---@return Table_PublicAtlasItem
function Table_PublicAtlasMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_PublicAtlasItem
function Table_PublicAtlasMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_PublicAtlasMgr:Load(reader)
    local item = Table_PublicAtlasItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_PublicAtlasMgr;